/**
 * 
 */

package com.pp.admin.common.client.helper;

import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.HTML;
import com.pp.admin.common.client.i18.I18;

/**
 * @author pandurang
 */
public class AdminFlexTable extends FlexTable implements I18 {
	
	public static final int		FIELD_COL		= 1;
	
	public static final int		LABEL_COL		= 0;
	
	public static final String	ATR_TD_COLSPAN	= "colspan";
	
	public void setHorizontalLine( int row, int col, int noCol ) {

		setWidget( row, col, new HTML( "<hr>" ) );
		DOM.setElementAttribute( getCellFormatter().getElement( row, col ), ATR_TD_COLSPAN, "" + noCol );
	}
	
	public void setTdAttribute( int row, int col, String attribute, String value ) {

		DOM.setElementAttribute( getCellFormatter().getElement( row, col ), attribute, value );
	}
}
